<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/29 0029
 * Time: 21:20
 */

namespace App\Rpc\Client;


use Swoft\Rpc\Client\Contract\ProviderInterface;

class Provider implements ProviderInterface
{
    protected $serviceName;

    public function __construct($serviceName)
    {
        $this->serviceName = $serviceName;
    }

    public function getList(): array
    {
//        var_dump($this->serviceName);
        $config = bean('config')->get('provider.consul');
        $address = bean('consulProvider')->getServerList($this->serviceName, $config);
        // TODO: Implement getList() method.
        return ['127.0.0.1:9508', '127.0.0.1:9508'];
    }

}